package interfaz;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JLayeredPane;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.Component;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class MenuPeriodista extends JDialog {
	private static GestionarPuntajeFecha gestionarPuntaje;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MenuPeriodista frame = new MenuPeriodista();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MenuPeriodista() {
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setIconImage(Toolkit.getDefaultToolkit().getImage(RegistroDeUsuario.class.getResource("/assets/Footxi.png")));
		setBounds(100, 100, 800, 600);
		setSize(750,600);
		
		JLayeredPane layeredPane = new JLayeredPane();
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addComponent(layeredPane, GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE)
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addComponent(layeredPane, GroupLayout.DEFAULT_SIZE, 562, Short.MAX_VALUE)
		);
		
		JButton btnPuntajesFecha = new JButton("Gestionar Puntajes de Fecha");
		btnPuntajesFecha.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			gestionarPuntaje = new GestionarPuntajeFecha();
				gestionarPuntaje.setVisible(true);
			}
		});
		btnPuntajesFecha.setFont(new Font("Tahoma", Font.PLAIN, 15));
		btnPuntajesFecha.setBounds(240, 258, 265, 37);
		layeredPane.add(btnPuntajesFecha);
		
		JLabel lblPeriodista = new JLabel("Nombre_Periodista");
		lblPeriodista.setHorizontalAlignment(SwingConstants.CENTER);
		lblPeriodista.setForeground(Color.BLACK);
		lblPeriodista.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblPeriodista.setBounds(554, 76, 150, 16);
		layeredPane.add(lblPeriodista);
		
		JLabel lblTitulo = new JLabel("FUTBOL MANAGER");
		lblTitulo.setFont(new Font("Tahoma", Font.BOLD, 15));
		lblTitulo.setHorizontalAlignment(SwingConstants.CENTER);
		lblTitulo.setBounds(219, 16, 286, 76);
		layeredPane.add(lblTitulo);
		
		JLabel lblFootix = new JLabel("");
		lblFootix.setIcon(new ImageIcon(MenuPeriodista.class.getResource("/assets/MenuParticipante/Footxi.png")));
		lblFootix.setHorizontalAlignment(SwingConstants.CENTER);
		lblFootix.setBounds(20, 276, 210, 255);
		layeredPane.add(lblFootix);
		
		JLabel lblCerrarSesin = new JLabel("Cerrar Sesi\u00F3n");
		lblCerrarSesin.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblCerrarSesin.setForeground(Color.BLUE);
		lblCerrarSesin.setBounds(610, 510, 114, 14);
		layeredPane.add(lblCerrarSesin);
		getContentPane().setLayout(groupLayout);
	}

	public static void closeWindow() {
		// TODO Auto-generated method stub
		gestionarPuntaje.setVisible(false);
	}
}
